<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<!--
   Licensed to the Apache Software Foundation (ASF) under one or more
   contributor license agreements.  See the NOTICE file distributed with
   this work for additional information regarding copyright ownership.
   The ASF licenses this file to You under the Apache License, Version 2.0
   (the "License"); you may not use this file except in compliance with
   the License.  You may obtain a copy of the License at

       http://www.apache.org/licenses/LICENSE-2.0

   Unless required by applicable law or agreed to in writing, software
   distributed under the License is distributed on an "AS IS" BASIS,
   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
   See the License for the specific language governing permissions and
   limitations under the License.
-->
<!-- Generated by Apache Maven Doxia at Jul 29, 2014 -->
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
		<title>
        Flume Next Gen Appender - Apache Log4j Flume NG Bridge</title>
		<link rel="stylesheet" href="./css/bootstrap.min.css" type="text/css" />
		<link rel="stylesheet" href="./css/site.css" type="text/css" />
		<script type="text/javascript" src="./js/jquery.min.js"></script>
		<script type="text/javascript" src="./js/bootstrap.min.js"></script>
		<script type="text/javascript" src="./js/prettify.min.js"></script>
		<script type="text/javascript" src="./js/site.js"></script>
			<meta name="author" content="Ralph Goers" />
		<meta name="Date-Revision-yyyymmdd" content="20140729" />
		<meta http-equiv="Content-Language" content="en" />
		
				</head>
	<body class="composite">
		<img class="logo-left" src="./images/ls-logo.jpg" alt="Apache logging services logo" />
		<img class="logo-right" src="./images/logo.jpg" alt="Apache log4j logo" />
		<div class="clear"></div>

		<div class="navbar">
			<div class="navbar-inner">
				<div class="container-fluid">
					<a class="brand" href="http://logging.apache.org/log4j/2.x/log4j-flume-ng/">Apache Log4j Flume NG Bridge &trade;</a>
						<ul class="nav">
						<li>
					
				
				<a href="http://wiki.apache.org/logging" class="external" target="_blank" title="Logging Wiki">Logging Wiki</a>
			</li>
					<li>
					
				
				<a href="http://www.apache.org/" class="external" target="_blank" title="Apache">Apache</a>
			</li>
					<li>
									<a href="../../../" title="Logging Services">Logging Services</a>
			</li>
					<li>
					
				
				<a href="https://analysis.apache.org/dashboard/index/org.apache.logging.log4j:log4j" class="external" target="_blank" title="Sonar">Sonar</a>
			</li>
					<li>
									<a href="../index.html" title="Log4j">Log4j</a>
			</li>
		</ul>
				</div>
			</div>
		</div>

		<div class="container-fluid">
			<table class="layout-table">
				<tr>
					<td class="sidebar">
						<div class="well sidebar-nav">
										<ul class="nav nav-list">
		 											 <li class="nav-header"><i class="icon-home"></i>Apache Log4j™ 2</li>
																						<li class="none">
									<a href="../index.html" title="About">About</a>
					</li>
 																<li class="none">
									<a href="../download.html" title="Download">Download</a>
					</li>
 																<li class="none">
									<a href="../maven-artifacts.html" title="Maven and Ivy">Maven and Ivy</a>
					</li>
 																<li class="none">
									<a href="../build.html" title="Build">Build</a>
					</li>
 																<li class="none">
									<a href="../guidelines.html" title="Guidelines">Guidelines</a>
					</li>
 																<li class="none">
									<a href="../javastyle.html" title="Style Guide">Style Guide</a>
					</li>
 																<li class="none">
									<a href="../changelog.html" title="Changelog">Changelog</a>
					</li>
 																																																																				<li class="collapsed">
									<a href="../javadoc.html" title="Javadoc">Javadoc</a>
										</li>
 																<li class="none">
									<a href="../faq.html" title="FAQ">FAQ</a>
					</li>
 								</ul>
			<ul class="nav nav-list">
		 											 <li class="nav-header"><i class="icon-book"></i>Manual</li>
																						<li class="none">
									<a href="../manual/index.html" title="Introduction">Introduction</a>
					</li>
 																<li class="none">
									<a href="../manual/architecture.html" title="Architecture">Architecture</a>
					</li>
 																<li class="none">
									<a href="../manual/migration.html" title="Log4j 1.x Migration">Log4j 1.x Migration</a>
					</li>
 																																																																													<li class="collapsed">
									<a href="../manual/api.html" title="API">API</a>
										</li>
 																																																																																																																																																														<li class="collapsed">
									<a href="../manual/configuration.html" title="Configuration">Configuration</a>
										</li>
 																																																																																						<li class="collapsed">
									<a href="../manual/webapp.html" title="Web Applications and JSPs">Web Applications and JSPs</a>
										</li>
 																																																																													<li class="collapsed">
									<a href="../manual/plugins.html" title="Plugins">Plugins</a>
										</li>
 																																																																																																								<li class="collapsed">
									<a href="../manual/lookups.html" title="Lookups">Lookups</a>
										</li>
 																																																																																																																																																																																																											<li class="collapsed">
									<a href="../manual/appenders.html" title="Appenders">Appenders</a>
										</li>
 																																																																																															<li class="collapsed">
									<a href="../manual/layouts.html" title="Layouts">Layouts</a>
										</li>
 																																																																																																																										<li class="collapsed">
									<a href="../manual/filters.html" title="Filters">Filters</a>
										</li>
 																																																																																						<li class="collapsed">
									<a href="../manual/async.html" title="Async Loggers">Async Loggers</a>
										</li>
 																<li class="none">
									<a href="../manual/jmx.html" title="JMX">JMX</a>
					</li>
 																<li class="none">
									<a href="../manual/logsep.html" title="Logging Separation">Logging Separation</a>
					</li>
 																																																																																																																										<li class="collapsed">
									<a href="../manual/extending.html" title="Extending Log4j">Extending Log4j</a>
										</li>
 																																																		<li class="collapsed">
									<a href="../manual/customconfig.html" title="Extending Log4j Configuration">Extending Log4j Configuration</a>
										</li>
 																																																																				<li class="collapsed">
									<a href="../manual/customloglevels.html" title="Custom Log Levels">Custom Log Levels</a>
										</li>
 								</ul>
			<ul class="nav nav-list">
		 											 <li class="nav-header"><i class="icon-cog"></i>Components</li>
																						<li class="none">
									<a href="../log4j-api/index.html" title="API">API</a>
					</li>
 																<li class="none">
									<a href="../log4j-core/index.html" title="Implementation">Implementation</a>
					</li>
 																<li class="none">
									<a href="../log4j-jcl/index.html" title="Commons Logging Bridge">Commons Logging Bridge</a>
					</li>
 																<li class="none">
									<a href="../log4j-1.2-api/index.html" title="Log4j 1.2 API">Log4j 1.2 API</a>
					</li>
 																<li class="none">
									<a href="../log4j-slf4j-impl/index.html" title="SLF4J Binding">SLF4J Binding</a>
					</li>
 																<li class="none">
									<a href="../log4j-to-slf4j/index.html" title="Log4j 2 to SLF4J Adapter">Log4j 2 to SLF4J Adapter</a>
					</li>
 																	<li class="none active">
									<a href="../log4j-flume-ng/index.html" title="Apache Flume NG Appender">Apache Flume NG Appender</a>
					</li>
 																<li class="none">
									<a href="../log4j-taglib/index.html" title="Log4j Tag Library">Log4j Tag Library</a>
					</li>
 																<li class="none">
									<a href="../log4j-jmx-gui/index.html" title="Log4j JMX GUI">Log4j JMX GUI</a>
					</li>
 																<li class="none">
									<a href="../log4j-web/index.html" title="Log4j Web Application Support">Log4j Web Application Support</a>
					</li>
 																<li class="none">
									<a href="../log4j-nosql/index.html" title="Log4j NoSQL support">Log4j NoSQL support</a>
					</li>
 								</ul>
			<ul class="nav nav-list">
		 														 <li class="nav-header">Component Documentation</li>
																																																																																																																																							<li class="expanded">
									<a href="project-info.html" title="Component Information">Component Information</a>
										<ul>
																						<li class="none active">
									<a href="index.html" title="About">About</a>
					</li>
 																						<li class="none">
									<a href="dependencies.html" title="Dependencies">Dependencies</a>
					</li>
 																						<li class="none">
									<a href="dependency-convergence.html" title="Dependency Convergence">Dependency Convergence</a>
					</li>
 																						<li class="none">
									<a href="dependency-management.html" title="Dependency Management">Dependency Management</a>
					</li>
 																	<!-- Removing overall project item Project Team from component-specific menu -->
																	<!-- Removing overall project item Mailing Lists from component-specific menu -->
																	<!-- Removing overall project item Issue Tracking from component-specific menu -->
																	<!-- Removing overall project item Project License from component-specific menu -->
																	<!-- Removing overall project item Source Repository from component-specific menu -->
																						<li class="none">
									<a href="project-summary.html" title="Component Summary">Component Summary</a>
					</li>
 										</ul>
							</li>
 																																																																																																										<li class="collapsed">
									<a href="project-reports.html" title="Component Reports">Component Reports</a>
										</li>
 								</ul>
			<ul class="nav nav-list">
		 											 <li class="nav-header"><i class="icon-info-sign"></i>Log4j Project Information</li>
																						<li class="none">
									<a href="../dependencies.html" title="Dependencies">Dependencies</a>
					</li>
 																<li class="none">
									<a href="../dependency-convergence.html" title="Dependency Convergence">Dependency Convergence</a>
					</li>
 																<li class="none">
									<a href="../dependency-management.html" title="Dependency Management">Dependency Management</a>
					</li>
 																<li class="none">
									<a href="../team-list.html" title="Project Team">Project Team</a>
					</li>
 																<li class="none">
									<a href="../mail-lists.html" title="Mailing Lists">Mailing Lists</a>
					</li>
 																<li class="none">
									<a href="../issue-tracking.html" title="Issue Tracking">Issue Tracking</a>
					</li>
 																<li class="none">
									<a href="../license.html" title="Project License">Project License</a>
					</li>
 																<li class="none">
									<a href="../source-repository.html" title="Source Repository">Source Repository</a>
					</li>
 																<li class="none">
									<a href="../project-summary.html" title="Project Summary">Project Summary</a>
					</li>
 								</ul>
			<ul class="nav nav-list">
		 											 <li class="nav-header"><i class="icon-cog"></i>Log4j Project Reports</li>
																						<li class="none">
									<a href="../changes-report.html" title="Changes Report">Changes Report</a>
					</li>
 																<li class="none">
									<a href="../jira-report.html" title="JIRA Report">JIRA Report</a>
					</li>
 																<li class="none">
									<a href="../surefire-report.html" title="Surefire Report">Surefire Report</a>
					</li>
 																<li class="none">
									<a href="../rat-report.html" title="RAT Report">RAT Report</a>
					</li>
 								</ul>
							</div>
						<div id="poweredBy">
															<a href="http://maven.apache.org/" title="Built by Maven" class="poweredBy">
				<img class="poweredBy" alt="Built by Maven" src="./images/maven-feather.png" />
			</a>
									</div>
					</td>
					<td class="content">
						<!-- Licensed to the Apache Software Foundation (ASF) under one or more
    contributor license agreements.  See the NOTICE file distributed with
    this work for additional information regarding copyright ownership.
    The ASF licenses this file to You under the Apache License, Version 2.0
    (the "License"); you may not use this file except in compliance with
    the License.  You may obtain a copy of the License at

         http://www.apache.org/licenses/LICENSE-2.0

    Unless required by applicable law or agreed to in writing, software
    distributed under the License is distributed on an "AS IS" BASIS,
    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    See the License for the specific language governing permissions and
    limitations under the License. --><!-- TODO: turn this into a velocity template for all the version numbers -->
    
        <div class="section"><h2>Flume Next Gen Appender<a name="Flume_Next_Gen_Appender"></a></h2>

            <p>
              The Flume NG Appender allows applications to send events to Flume NG Agents.
            </p>
          <div class="section"><h3>Remote Agent<a name="Remote_Agent"></a></h3>
            <p>
              Including the Log4j flume-ng jar in your Maven-based project as a dependency should cause all the
              transitive dependencies necessary for the remote Agent to function to be included.
            </p>
          </div>
          <div class="section"><h3>Persistent Agent<a name="Persistent_Agent"></a></h3>
            <p>
              The persistent agent uses Berkeley DB. The following dependency should be added to your pom.xml
              in addition to the log4j-flume-ng dependency.
            </p>
            <div class="prettyprint linenums"><pre>  &lt;dependencyManagement&gt;
    &lt;dependencies&gt;
      &lt;dependency&gt;
        &lt;groupId&gt;com.sleepycat&lt;/groupId&gt;
        &lt;artifactId&gt;je&lt;/artifactId&gt;
        &lt;version&gt;5.0.73&lt;/version&gt;
      &lt;/dependency&gt;
    &lt;/dependencies&gt;
  &lt;/dependencyManagement&gt;
  &lt;dependencies&gt;
    &lt;dependency&gt;
      &lt;groupId&gt;com.sleepycat&lt;/groupId&gt;
      &lt;artifactId&gt;je&lt;/artifactId&gt;
    &lt;/dependency&gt;
  &lt;/dependencies&gt;
  &lt;repositories&gt;
    &lt;repository&gt;
      &lt;id&gt;oracleReleases&lt;/id&gt;
      &lt;name&gt;Oracle Released Java Packages&lt;/name&gt;
      &lt;url&gt;http://download.oracle.com/maven&lt;/url&gt;
      &lt;layout&gt;default&lt;/layout&gt;
    &lt;/repository&gt;
  &lt;/repositories&gt;</pre></div>
          </div>

          <div class="section"><h3>Embedded Agent<a name="Embedded_Agent"></a></h3>
            <p>
              The following is a sample pom file for Maven that can be used as a template for integrating the
              Flume Embedded Appender into an application.
            </p>
            <div class="prettyprint linenums"><pre>&lt;project xmlns=&quot;http://maven.apache.org/POM/4.0.0&quot; xmlns:xsi=&quot;http://www.w3.org/2001/XMLSchema-instance&quot;
         xsi:schemaLocation=&quot;http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd&quot;&gt;
  &lt;modelVersion&gt;4.0.0&lt;/modelVersion&gt;
  &lt;groupId&gt;com.myapp&lt;/groupId&gt;
  &lt;artifactId&gt;myapp&lt;/artifactId&gt;
  &lt;version&gt;0.0.1-SNAPSHOT&lt;/version&gt;
  &lt;name&gt;My App&lt;/name&gt;
  &lt;description&gt;App to test log4j appender&lt;/description&gt;

  &lt;properties&gt;
    &lt;log4j.version&gt;2.0-rc2&lt;/log4j.version&gt;
    &lt;slf4j.version&gt;1.7.6&lt;/slf4j.version&gt;
    &lt;jackson.version&gt;1.9.13&lt;/jackson.version&gt;
  &lt;/properties&gt;

  &lt;dependencyManagement&gt;
    &lt;dependencies&gt;
      &lt;dependency&gt;
        &lt;groupId&gt;org.slf4j&lt;/groupId&gt;
        &lt;artifactId&gt;slf4j-api&lt;/artifactId&gt;
        &lt;version&gt;${slf4j.version}&lt;/version&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
        &lt;groupId&gt;org.slf4j&lt;/groupId&gt;
        &lt;artifactId&gt;slf4j-ext&lt;/artifactId&gt;
        &lt;version&gt;${slf4j.version&gt;&lt;/version&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
        &lt;groupId&gt;org.apache.logging.log4j&lt;/groupId&gt;
        &lt;artifactId&gt;log4j-api&lt;/artifactId&gt;
        &lt;version&gt;${log4j2_version}&lt;/version&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
        &lt;groupId&gt;org.apache.logging.log4j&lt;/groupId&gt;
        &lt;artifactId&gt;log4j-1.2-api&lt;/artifactId&gt;
        &lt;version&gt;${log4j2_version}&lt;/version&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
        &lt;groupId&gt;org.apache.logging.log4j&lt;/groupId&gt;
        &lt;artifactId&gt;log4j-core&lt;/artifactId&gt;
        &lt;version&gt;${log4j2_version}&lt;/version&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
        &lt;groupId&gt;org.apache.logging.log4j&lt;/groupId&gt;
        &lt;artifactId&gt;log4j-flume-ng&lt;/artifactId&gt;
        &lt;version&gt;${log4j2_version}&lt;/version&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
        &lt;groupId&gt;org.apache.logging.log4j&lt;/groupId&gt;
        &lt;artifactId&gt;log4j-slf4j-impl&lt;/artifactId&gt;
        &lt;version&gt;${log4j2_version}&lt;/version&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
        &lt;groupId&gt;org.apache.logging.log4j&lt;/groupId&gt;
        &lt;artifactId&gt;log4j-jcl&lt;/artifactId&gt;
        &lt;version&gt;${log4j2_version}&lt;/version&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
        &lt;groupId&gt;org.codehaus.jackson&lt;/groupId&gt;
        &lt;artifactId&gt;jackson-core-asl&lt;/artifactId&gt;
        &lt;version&gt;${jackson.version}&lt;/version&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
        &lt;groupId&gt;org.codehaus.jackson&lt;/groupId&gt;
        &lt;artifactId&gt;jackson-mapper-asl&lt;/artifactId&gt;
        &lt;version&gt;${jackson.version}&lt;/version&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
        &lt;groupId&gt;org.codehaus.jackson&lt;/groupId&gt;
        &lt;artifactId&gt;jackson-jaxrs&lt;/artifactId&gt;
        &lt;version&gt;${jackson.version}&lt;/version&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
        &lt;groupId&gt;org.codehaus.jackson&lt;/groupId&gt;
        &lt;artifactId&gt;jackson-xc&lt;/artifactId&gt;
        &lt;version&gt;${jackson.version}&lt;/version&gt;
      &lt;/dependency&gt;
    &lt;/dependencies&gt;
  &lt;/dependencyManagement&gt;

  &lt;dependencies&gt;
    &lt;!-- Log4j 2 API --&gt;
    &lt;dependency&gt;
      &lt;groupId&gt;org.apache.logging.log4j&lt;/groupId&gt;
      &lt;artifactId&gt;log4j-api&lt;/artifactId&gt;
    &lt;/dependency&gt;
    &lt;!-- Log4j 1.x API --&gt;
    &lt;dependency&gt;
      &lt;groupId&gt;org.apache.logging.log4j&lt;/groupId&gt;
      &lt;artifactId&gt;log4j12-api&lt;/artifactId&gt;
    &lt;/dependency&gt;
    &lt;!-- Log4j 2 implementation --&gt;
    &lt;dependency&gt;
      &lt;groupId&gt;org.apache.logging.log4j&lt;/groupId&gt;
      &lt;artifactId&gt;log4j-core&lt;/artifactId&gt;
    &lt;/dependency&gt;
    &lt;!-- SLF4J to Log4j 2 binding --&gt;
    &lt;dependency&gt;
      &lt;groupId&gt;org.apache.logging.log4j&lt;/groupId&gt;
      &lt;artifactId&gt;slf4j-impl&lt;/artifactId&gt;
    &lt;/dependency&gt;
    &lt;!-- SLF4J API --&gt;
    &lt;dependency&gt;
      &lt;groupId&gt;org.slf4j&lt;/groupId&gt;
      &lt;artifactId&gt;slf4j-api&lt;/artifactId&gt;
    &lt;/dependency&gt;
    &lt;!-- SLF4J extensions --&gt;
    &lt;dependency&gt;
      &lt;groupId&gt;org.slf4j&lt;/groupId&gt;
      &lt;artifactId&gt;slf4j-ext&lt;/artifactId&gt;
    &lt;/dependency&gt;
    &lt;!-- Commson Logging to Log4j 2 binding --&gt;
    &lt;dependency&gt;
      &lt;groupId&gt;org.apache.logging.log4j&lt;/groupId&gt;
      &lt;artifactId&gt;log4j-jcl&lt;/artifactId&gt;
    &lt;/dependency&gt;
    &lt;!-- Avro transport protocol - required for Flume --&gt;
    &lt;dependency&gt;
      &lt;groupId&gt;org.apache.avro&lt;/groupId&gt;
      &lt;artifactId&gt;avro&lt;/artifactId&gt;
      &lt;version&gt;1.6.3&lt;/version&gt;
    &lt;/dependency&gt;
    &lt;!-- Hadoop core - required by embedded Flume Agent --&gt;
    &lt;dependency&gt;
      &lt;groupId&gt;org.apache.hadoop&lt;/groupId&gt;
      &lt;artifactId&gt;hadoop-core&lt;/artifactId&gt;
      &lt;version&gt;1.0.3&lt;/version&gt;
      &lt;exclusions&gt;
        &lt;exclusion&gt;
          &lt;groupId&gt;org.mortbay.jetty&lt;/groupId&gt;
          &lt;artifactId&gt;servlet-api&lt;/artifactId&gt;
        &lt;/exclusion&gt;
        &lt;exclusion&gt;
          &lt;groupId&gt;org.mortbay.jetty&lt;/groupId&gt;
          &lt;artifactId&gt;servlet-api-2.5&lt;/artifactId&gt;
        &lt;/exclusion&gt;
        &lt;exclusion&gt;
          &lt;groupId&gt;junit&lt;/groupId&gt;
          &lt;artifactId&gt;junit&lt;/artifactId&gt;
        &lt;/exclusion&gt;
      &lt;/exclusions&gt;
    &lt;/dependency&gt;
    &lt;!-- Flume File Channel - required by embedded Flume agent --&gt;
    &lt;dependency&gt;
      &lt;groupId&gt;org.apache.flume.flume-ng-channels&lt;/groupId&gt;
      &lt;artifactId&gt;flume-file-channel&lt;/artifactId&gt;
      &lt;version&gt;1.2.0&lt;/version&gt;
      &lt;exclusions&gt;
        &lt;exclusion&gt;
          &lt;groupId&gt;log4j&lt;/groupId&gt;
          &lt;artifactId&gt;log4j&lt;/artifactId&gt;
        &lt;/exclusion&gt;
        &lt;exclusion&gt;
          &lt;groupId&gt;org.slf4j&lt;/groupId&gt;
          &lt;artifactId&gt;slf4j-log4j12&lt;/artifactId&gt;
        &lt;/exclusion&gt;
      &lt;/exclusions&gt;
    &lt;/dependency&gt;
  &lt;/dependencies&gt;
&lt;/project&gt;</pre></div>
          </div>

        </div>

        <div class="section"><h2>Requirements<a name="Requirements"></a></h2>
           <p>
             The Flume NG Appender requires at least Java 6.
          </p>
        </div>

    

					</td>
				</tr>
			</table>
		</div>

		<div class="footer">
							<p>Copyright &copy; 1999-2014 <a class="external" href="http://www.apache.org">Apache Software Foundation</a>. All Rights Reserved.</p>
				<p>Apache Logging, Apache Log4j, Log4j, Apache, the Apache feather logo, and the Apache Logging project logo are trademarks of The Apache Software Foundation.</p>
				<p>Site powered by <a class="external" href="http://twitter.github.com/bootstrap/">Twitter Bootstrap</a>. Icons from <a class="external" href="http://glyphicons.com/">Glyphicons Free</a>.</p>
			</div>
		</div>
	</body>
</html>
